public class Test {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        double x = 1.1;
        double y = 2.5;
        double z = 1.99;
        System.out.println(sum(a,b));
        System.out.println(sum(x,y,z));
    }

    public static int sum(int a,int b){
        if(a > b){
            return a;
        }
        return b;
    }

    public static double sum(double x,double y,double z){
        if((x > y) || (x > z)){
            return x;
        } else if(y > z){
            return y;
        } else{
            return z;
        }
    }
}
